package com.entity;

public class Goods {
    private Long id;

    private String goodsName;

    private Double goodsPrice;

    //没有构造方法(默认构造方法)

    public Long getId() {
        System.out.println("调用到了 getId 方法");
        return id;
    }

    public void setId(Long id) {
        this.id = id;
        System.out.println("调用到了setId方法");
    }

    public String getGoodsName() {
        System.out.println("调用到了 getGoodsName 方法");
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
        System.out.println("调用到了 setGoodsName 方法");
    }

    public Double getGoodsPrice() {
        System.out.println("调用到了 getGoodsPrice 方法");
        return goodsPrice;
    }

    public void setGoodsPrice(Double goodsPrice) {
        this.goodsPrice = goodsPrice;
        System.out.println("调用到了 setGoodsPrice 方法");
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", goodsName='" + goodsName + '\'' +
                ", goodsPrice=" + goodsPrice +
                '}';
    }
}
